home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / program / wdj0697.zip / WIESMAN.ZIP / CCAPP.CPP next >
C/C++ Source or Header  |  1997-01-19  |  2KB  |  76 lines

  1. // CCApp.cpp : Defines the class behaviors for the application.
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include "CCApp.h"
  6. #include "custctrl.h"
  7. #include "CtrlDlg.h"
  8.  
  9. #ifdef _DEBUG
  10. #define new DEBUG_NEW
  11. #undef THIS_FILE
  12. static char THIS_FILE[] = __FILE__;
  13. #endif
  14.  
  15. /////////////////////////////////////////////////////////////////////////////
  16. // CCustCtrlApp
  17.  
  18. BEGIN_MESSAGE_MAP(CCustCtrlApp, CWinApp)
  19.     //{{AFX_MSG_MAP(CCustCtrlApp)
  20.         // NOTE - the ClassWizard will add and remove mapping macros here.
  21.         //    DO NOT EDIT what you see in these blocks of generated code!
  22.     //}}AFX_MSG
  23.     ON_COMMAND(ID_HELP, CWinApp::OnHelp)
  24. END_MESSAGE_MAP()
  25.  
  26. /////////////////////////////////////////////////////////////////////////////
  27. // CCustCtrlApp construction
  28.  
  29. CCustCtrlApp::CCustCtrlApp()
  30. {
  31.     // TODO: add construction code here,
  32.     // Place all significant initialization in InitInstance
  33. }
  34.  
  35. /////////////////////////////////////////////////////////////////////////////
  36. // The one and only CCustCtrlApp object
  37.  
  38. CCustCtrlApp theApp;
  39.  
  40. /////////////////////////////////////////////////////////////////////////////
  41. // CCustCtrlApp initialization
  42.  
  43. BOOL CCustCtrlApp::InitInstance()
  44. {
  45.     // Standard initialization
  46.     // If you are not using these features and wish to reduce the size
  47.     //  of your final executable, you should remove from the following
  48.     //  the specific initialization routines you do not need.
  49.  
  50. #ifdef _AFXDLL
  51.     Enable3dControls();            // Call this when using MFC in a shared DLL
  52. #else
  53.     Enable3dControlsStatic();    // Call this when linking to MFC statically
  54. #endif
  55.  
  56.     ASSERT(CCustomControlTerm::m_bInitialized);
  57.  
  58.     CCustCtrlDlg dlg;
  59.     m_pMainWnd = &dlg;
  60.     int nResponse = dlg.DoModal();
  61.     if (nResponse == IDOK)
  62.     {
  63.         // TODO: Place code here to handle when the dialog is
  64.         //  dismissed with OK
  65.     }
  66.     else if (nResponse == IDCANCEL)
  67.     {
  68.         // TODO: Place code here to handle when the dialog is
  69.         //  dismissed with Cancel
  70.     }
  71.  
  72.     // Since the dialog has been closed, return FALSE so that we exit the
  73.     //  application, rather than start the application's message pump.
  74.     return FALSE;
  75. }
  76.